package cn.hxzy.entity;

import java.io.Serializable;
import java.util.Date;

public class News extends NewsExt implements Serializable {

  private Integer id;
  private String name;
  private String newValue;
  private Date creatTime;
  private Integer userId;


  public News() {
  }

  @Override
  public String toString() {
    return "New{" +
            "id=" + id +
            ", name='" + name + '\'' +
            ", newValue='" + newValue + '\'' +
            ", creatTime=" + creatTime +
            ", user=" + getUser() +
            '}';
  }

  public News(String name, String newValue,Integer id) {
    this.name = name;
    this.newValue = newValue;
    this.id=id;
  }

  public News(String name, String newValue, Date creatTime, Integer userId,Integer id) {
    this.name = name;
    this.newValue = newValue;
    this.creatTime = creatTime;
    this.userId = userId;
    this.id=id;
  }
  public News(String name, String newValue, Date creatTime, Integer userId) {
    this.name = name;
    this.newValue = newValue;
    this.creatTime = creatTime;
    this.userId = userId;
  }

  public News(String name, String newValue, Integer userId, String username) {
    this.name = name;
    this.newValue = newValue;
    this.userId = userId;
    User user=new User();
    user.setId(userId);
    user.setName(username);
    this.setUser(user);
//    this.creatTime=creatTime;
  }


  public Integer getId() {
    return id;
  }

  public void setId(Integer id) {
    this.id = id;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getNewValue() {
    return newValue;
  }

  public void setNewValue(String newValue) {
    this.newValue = newValue;
  }

  public Date getCreatTime() {
    return creatTime;
  }

  public void setCreatTime(Date creatTime) {
    this.creatTime = creatTime;
  }

  public Integer getUserId() {
    return userId;
  }

  public void setUserId(Integer userId) {
    this.userId = userId;
  }
}
